package com.touchyourheart.model.bean;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "category_child")
public class CategoryChild implements Serializable {

  private static final long serialVersionUID = -1635207472593245225L;

  @Id
  @GeneratedValue(strategy = GenerationType.AUTO)
  private long id;

  @Column(name = "name", nullable = false, length = 16)
  private String name;

  @Column(name = "order_seq")
  private int orderSeq;

  @ManyToOne
  @JoinColumn(name = "category_id_fk", foreignKey = @ForeignKey(name = "ch_category_id_fk"))
  private Category cagetory;

  public long getId() {
    return id;
  }

  public void setId(long id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public int getOrderSeq() {
    return orderSeq;
  }

  public void setOrderSeq(int orderSeq) {
    this.orderSeq = orderSeq;
  }

  public Category getCagetory() {
    return cagetory;
  }

  public void setCagetory(Category cagetory) {
    this.cagetory = cagetory;
  }

}
